<script type="text/html" template lay-done="layui.data.sendParams(d);">
    <div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-WeChatUserAccessToken-editForm" id="LAY-app-WeChatUserAccessToken-editForm">
	    <input type="hidden" name="id"  value="{{d.params.data.id || '' }}" />
	    <div class="layui-form-item">
            <label for="id" class="layui-form-label  layui-form-required">序列</label>
            <div class="layui-input-block">
                <input  type="number" lay-affix="number" min="0" max="999999" name="id"   lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.id || '' }}" placeholder="请输入序列" lay-reqText="请输入序列并为数字"  />
            </div>
        </div>
	    
	    <div class="layui-form-item">
            <label for="access_token" class="layui-form-label  layui-form-required">网页授权接口调用凭证</label>
            <div class="layui-input-block">
            <input name="access_token"   lay-verType="tips" lay-verify="required|verifyaccess_token" class="layui-input" placeholder="请输入网页授权接口调用凭证" lay-reqText="请输入网页授权接口调用凭证"  value="{{d.params.data.access_token || '' }}" />
            </div>
        </div>
	    
	    <div class="layui-form-item">
            <label for="expires_in" class="layui-form-label  layui-form-required">超时时间秒</label>
            <div class="layui-input-block">
                <input  type="number" lay-affix="number" min="0" max="999999" name="expires_in"   lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.expires_in || '' }}" placeholder="请输入超时时间秒" lay-reqText="请输入超时时间秒并为数字"  />
            </div>
        </div>
	    
	    <div class="layui-form-item">
            <label for="refresh_token" class="layui-form-label  layui-form-required">用户刷新access_token</label>
            <div class="layui-input-block">
            <input name="refresh_token"   lay-verType="tips" lay-verify="required|verifyrefresh_token" class="layui-input" placeholder="请输入用户刷新access_token" lay-reqText="请输入用户刷新access_token"  value="{{d.params.data.refresh_token || '' }}" />
            </div>
        </div>
	    
	    <div class="layui-form-item">
            <label for="openid" class="layui-form-label  layui-form-required">用户唯一标识</label>
            <div class="layui-input-block">
            <input name="openid"   lay-verType="tips" lay-verify="required|verifyopenid" class="layui-input" placeholder="请输入用户唯一标识" lay-reqText="请输入用户唯一标识"  value="{{d.params.data.openid || '' }}" />
            </div>
        </div>
	    
	    <div class="layui-form-item">
            <label for="scope" class="layui-form-label  layui-form-required">用户授权的作用域</label>
            <div class="layui-input-block">
            <input name="scope"   lay-verType="tips" lay-verify="required|verifyscope" class="layui-input" placeholder="请输入用户授权的作用域" lay-reqText="请输入用户授权的作用域"  value="{{d.params.data.scope || '' }}" />
            </div>
        </div>
	    
	    <div class="layui-form-item">
            <label for="is_snapshotuser" class="layui-form-label  layui-form-required">是否为快照页模式虚拟账号</label>
            <div class="layui-input-block">
                <input  type="number" lay-affix="number" min="0" max="999999" name="is_snapshotuser"   lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.is_snapshotuser || '' }}" placeholder="请输入是否为快照页模式虚拟账号" lay-reqText="请输入是否为快照页模式虚拟账号并为数字"  />
            </div>
        </div>
	    
	    <div class="layui-form-item">
            <label for="unionid" class="layui-form-label  layui-form-required">用户统一标识</label>
            <div class="layui-input-block">
            <input name="unionid"   lay-verType="tips" lay-verify="required|verifyunionid" class="layui-input" placeholder="请输入用户统一标识" lay-reqText="请输入用户统一标识"  value="{{d.params.data.unionid || '' }}" />
            </div>
        </div>
	    
        <div class="layui-form-item text-right core-hidden">
            <input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-WeChatUserAccessToken-editForm-submit" id="LAY-app-WeChatUserAccessToken-editForm-submit" value="确认编辑">
        </div>
    </div>
</script>
<script>
    var debug= layui.setter.debug;
    layui.data.sendParams = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }
        layui.use(['admin', 'form', 'laydate', 'upload', 'coreHelper', 'cropperImg'],
        function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , laydate = layui.laydate
                , upload = layui.upload
                , cropperImg = layui.cropperImg
                , coreHelper = layui.coreHelper;
        
            form.verify({
                
		        verifyaccess_token: [/^.{0,50}$/,'网页授权接口调用凭证最大只允许输入50位字符'],
		        verifyrefresh_token: [/^.{0,100}$/,'用户刷新access_token最大只允许输入100位字符'],
		        verifyopenid: [/^.{0,50}$/,'用户唯一标识最大只允许输入50位字符'],
		        verifyscope: [/^.{0,50}$/,'用户授权的作用域最大只允许输入50位字符'],
		        verifyunionid: [/^.{0,50}$/,'用户统一标识最大只允许输入50位字符'],
            });
            //重载form
            form.render(null, 'LAY-app-WeChatUserAccessToken-editForm');
        })
    };
</script>
